package com.jh.pattern.factory.simplefactory;

import com.jh.pattern.factory.ICourse;

/**
 * @author JH_Wong
 * @projectName newforward
 * @title
 * @package com.jh.pattern.factory.simplefactory
 * @description
 * @date 2019-05-07 21:28
 */
public class CourseFactory {

    public ICourse create(Class clazz) {
        try {
            if (null != clazz) {
                return (ICourse) clazz.newInstance();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

        return null;
    }

}
